<template>
  <div>
      123
      <router-link :to="{path:'/user/foo'}">test</router-link>
      <div>{{$route.params}}</div>

  </div>
</template>

<script>
export default {
    data(){
        return{

        }
    },
    created(){
        console.log(1)
    },
    methods:{

    },

    // watch:{
    //     $route(to,form){
    //         console.log(456)
    //     }
    // }
    beforeRouteUpdate(to, from, next) {
        console.log(789)
        next()
    }
}
</script>

<style>

</style>